|
|
|
|
|
|
|
However, if you give your users the ability to change colors, they can customize the colors so they dont conflict with their system colors. You can do this by using the Color dialog box, as shown in Figure 11.11. |
|
|
|
|
|
|
|
|
Figure 11.11
The Color dialog box. |
|
|
|
|
|
|
|
|
This Color dialog box is generated by using the following code: |
|
|
|
 |
|
|
|
|
Private Sub cmdColor_Click()
' Reset the Flags
cdlCommon.Flags = cdlCCFullOpen
' Display the Color dialog box
cdlCommon.ShowColor
' Fill in the background color with
' the color from the common dialog
lblColor.BackColor = cdlCommon.Color
End Sub |
|
|
|
|
|
|
|
|
The Flags property is set to cdlCCFullOpen so you get the full dialog box. If you dont set this flag, you wont see the custom colors on the right side of the dialog box. The only other Flag option you may set is cdlCCPreventFullOpen. If you set the Flag property to this value, the user wont be allowed to select the Define Custom Colors command button. |
|
|
|
|
|